--TEST--
bool MySQLndUhConnection::setCharset(resource $connection, string $charset)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
	require_once('config.inc');

	class proxy extends MySQLndUhConnection {
		public function setCharset($res, $charset) {
			printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
			return parent::setCharset($res, $charset);
		}
	}

	class proxy2 extends MySQLndUhConnection {
		public function setCharset($res, $charset) {
			return $charset;
		}
	}

	class proxy3 extends MySQLndUhConnection {
		public function setCharset($res, $charset) {
		}
	}

	$conn = mysqlnd_uh_test\connect::mysqli();
	mysqlnd_uh_test\query_test::mysqli($conn);
	var_dump($conn->set_charset("latin1"));

	mysqlnd_uh_set_connection_proxy(new proxy());
	var_dump($conn->set_charset("latin1"));
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy2());
	var_dump($conn->set_charset("latin1"));

	mysqlnd_uh_set_connection_proxy(new proxy3());
	var_dump($conn->set_charset("latin1"));

	print "done!";
?>
--EXPECTF--
bool(true)
proxy::setCharset(array (
  0 => NULL,
  1 => 'latin1',
))
bool(true)

Warning: mysqli::set_charset(): (MySQLnd User Handler) The method MySQLndUhConnection::setCharset() did not return a boolean value as it should in %s on line %d
bool(true)

Warning: mysqli::set_charset(): (MySQLnd User Handler) The method MySQLndUhConnection::setCharset() did not return a boolean value as it should in %s on line %d
bool(false)
done!